<%@page contentType="text/html;charset=utf-8"%>
<%@include file="../../core/common.jsp"%>
<html>
<head>
<title></title>
</head>
<body>
	<div id="tb" class="toolbar">
		<form id="fm">
			<table class="form-layout w80">
				<tr>
					<td>出库期起：</td>
					<td><input name="search_begin" class="easyui-datebox" data-options="editable:false" /></td>
					<td>出库期止：</td>
					<td><input name="search_end" class="easyui-datebox" data-options="editable:false" /></td>
				</tr>
			</table>
		</form>
		<div style="float: left;">
			<shiro:hasPermission name="fhd:update">
				<a id="update" class="form-btn primary">
					<i class="fa fa-pencil-square-o m-r-5"></i>编辑
				</a>
			</shiro:hasPermission>
			<shiro:hasPermission name="fhd:dc">
				<a id="dc" class="form-btn success">
					<i class="fa fa-file-excel-o m-r-5"></i>导出
				</a>
			</shiro:hasPermission>
		</div>
		<div style="float: right;">
			<a id="find" class="form-btn success">
				<i class="fa fa-search m-r-5"></i>查询
			</a>
			<a id="reset" class="form-btn default">
				<i class="fa fa-undo m-r-5"></i>重置
			</a>
		</div>
		<div style="clear: both;"></div>
	</div>
	<table id="dg" class="easyui-datagrid" data-options="url:'${CTX}/mgt/t/fhd/find',toolbar:'#tb',pagination:true">
		<thead>
			<tr>
				<th data-options="field:'ckrq',width:100">出库日期</th>
				<th data-options="field:'ddrq',width:100">到达日期</th>
				<th data-options="field:'nrrq',width:100">纳入日期</th>
				<th data-options="field:'cc',width:80">车次</th>
				<th data-options="field:'zl',width:80">重量(kg)</th>
				<th data-options="field:'mx',width:80">明细</th>
				<th data-options="field:'xh',width:120">箱号</th>
				<th data-options="field:'ch',width:80">车号</th>
				<th data-options="field:'lh',width:500">炉号</th>
			</tr>
		</thead>
	</table>
</body>
<script>
	$(function() {
		$('#find').click(function() {
			$('#dg').datagrid('reload', $('#fm').serializeObject());
		});
		$('#reset').click(function() {
			$('#fm').form('reset');
			$('#find').click();
		});
		$('#update').click(function() {
			var row = $('#dg').datagrid('getSelected');
			if (row) {
				$.open({
					title : $(this).html(),
					url : '${CTX}/mgt/t/fhd/update?id=' + row.id,
					end : function() {
						$('#find').click();
					}
				});
			} else {
				$.info('请选择出库单');
			}
		});
		$('#dc').click(function() {
			var param = '?' + $('#fm').serialize();
			window.location.href = '${CTX}/mgt/t/fhd/dc' + param;
		});
	});
</script>
</html>